/*
 * @Author: wuyue
 * @Date: 2023-02-20 21:05:50
 * @LastEditTime: 2023-03-22 12:10:04
 * @LastEditors: wuyue
 * @Descripttion: 计量设备调拨api
 * @version: 
 */
import request from '@/utils/request'
import { faceProducerApiUrl } from '@/api/config'
export function getList(data) {
    return request({
        url: `${faceProducerApiUrl}/mdInfoTransfer/queryMdTransferPage`,
        method: 'post',
        data
    })
}
// 获取统计数据
export function getStatisticsData(data) {
    return request({
        url: `${faceProducerApiUrl}/mdInfoTransfer/transferStatistics`,
        method: 'post',
        data
    })
}
// 新增
export function commit(data) {
    return request({
        url: `${faceProducerApiUrl}/mdInfoTransfer/commit`,
        method: 'post',
        data
    })
}

// 详情
 export function detailsItem(params) {
    return request({
        url: `${faceProducerApiUrl}/mdInfoTransfer/getMdTransferDetail`,
        method: 'get',
        params
    })
}

// 保存草稿
export function saveDraft(data) {
    return request({
        url: `${faceProducerApiUrl}/mdInfoTransfer/saveDraft`,
        method: 'post',
        data
    })
}

// 删除
export function deleteItem(data) {
    return request({
        url: `${faceProducerApiUrl}/mdInfoTransfer/deleteMdTransfer`,
        method: 'post',
        data
    })
}

// 导出
export function exportAll(data) {
    return request({
        url: `${faceProducerApiUrl}/mdInfoTransfer/exportAll`,
        method: 'post',
        data,
        responseType: 'blob'
    })
}

// 部分导出
export function chooseToExport(data) {
    return request({
        url: `${faceProducerApiUrl}/mdInfoTransfer/chooseToExport`,
        method: 'post',
        data,
        responseType: 'blob'
    })
}


// 调拨处理-选择可进行调出的自有设备
export function chooseDevicePage(data) {
    return request({
        url: `${faceProducerApiUrl}/mdInfoTransferProcess/chooseDevicePage`,
        method: 'post',
        data
    })
}


// 调拨处理 - 确认处理
export function confirmProcess(data) {
    return request({
        url: `${faceProducerApiUrl}/mdInfoTransferProcess/confirmProcess`,
        method: 'post',
        data
    })
}


// 调拨处理 - 驳回调拨
export function rejectProcess(data) {
    return request({
        url: `${faceProducerApiUrl}/mdInfoTransferProcess/rejectProcess`,
        method: 'post',
        data
    })
}

// 调入待办-查询调入确认内容
export function getTransferInRecord(params) {
    return request({
        url: `${faceProducerApiUrl}/mdInfoTransferProcess/getTransferInRecord`,
        method: 'get',
        params
    })
}

// 调入待办-确认处理
export function transferInConfirm(data) {
    return request({
        url: `${faceProducerApiUrl}/mdInfoTransferProcess/transferInConfirm`,
        method: 'post',
        data
    })
}

// 调出待办-查询调出确认内容
 export function getTransferOutRecord(params) {
    return request({
        url: `${faceProducerApiUrl}/mdInfoTransferProcess/getTransferOutRecord`,
        method: 'get',
        params
    })
}


// 调出待办-确认处理
export function transferOutConfirm(data) {
    return request({
        url: `${faceProducerApiUrl}/mdInfoTransferProcess/transferOutConfirm`,
        method: 'post',
        data
    })
}

// 获取调拨清单
export function queryTransferDetailPage(data) {
    return request({
        url: `${faceProducerApiUrl}/mdInfoTransferDetail/queryTransferDetailPage`,
        method: 'post',
        data
    })
}

// 调出待办-添加设备-所在项目查询
export function getChooseOwnInfoProjectList(params) {
    return request({
        url: `${faceProducerApiUrl}/mdInfoTransferProcess/getChooseOwnInfoProjectList`,
        method: 'get',
        params
    })
}